package org.yanghe.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import org.yanghe.service.OpenFeginService;

import javax.annotation.Resource;

/**
 * 服务降级
 */
@RestController
public class CHystrixFallBackController {

    @Resource
    private OpenFeginService service;

    @GetMapping("/consumer/hystrix/fallback/hello/{name}")
    public String hello(@PathVariable("name") String name){
        return service.hello(name)+"CHystrixFallBackController";
    }
}
